<?php slot('studyGroupsNav', 'active') ?>
<div class="courses" id="wrapper">
	<?php include_partial('global/systemMessages', array('form' => $form))?>
	<div id="content">
		<div id="main">
			<div class="main-heading">
				<h1><?php echo $group->getName() ?></h1>
			</div>
			<?php include_partial('groups/subnav', array('group_id' => $group->getId())) ?>

			<div class="tasks-heading">
				<div style="text-align: right;">
					<?php echo link_to('Create a New Task &#xBB;', 'tasks/new?group_id='.$group->getId())?>
					<a href="javascript:void(0);" style="color: #000; text-decoration: none;"><?php echo ($form->getObject()->isNew() ? 'Create a New' : 'Edit') ?> Task List &#xBB;</a>
				</div>
				<h2><?php echo $form->getObject()->isNew() ? 'Create a' : 'Edit'?> Task List</h2>
			</div>
			<div id="newtasklistbox" class="gray-box">
				<form method="post" action="<?php echo url_for('task_lists/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>">
					<label>Enter a name for this List:</label>
					<?php echo $form['name']->render(array('class' => 'input-text')) ?>					
					<div class="hrule">
						<hr/>
					</div>
					<label>Relate this List to a Course:</label>
					<?php echo $form['course_id']->render() ?>
					<div class="hrule">
						<hr/>
					</div>
					<label>Optionally choose a task type:</label>
					<?php echo $form['type_id']->render() ?>
					<div class="hrule white">
						<hr/>
					</div>
					<ul class="options">
						<li>
							<input type="submit" value="Save List"/>
						</li>
						<li>
							<?php echo link_to('Cancel', 'tasks/index?group_id='.$group->getId())?>
						</li>
					</ul>
					<input type="hidden" name="group_id" value="<?php echo $group->getId() ?>" />
					<?php echo $form->renderHiddenFields() ?>		
				</form>
			</div>
		</div>
		<div id="sidebar">
			<?php include_component('group_members', 'list', array('group_id' => $group->getId())) ?>	
		</div>
	</div>

</div>
			